<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
	<head>
		<title><?php echo TITREBO ?> - <?php echo trad($this -> titre, APPLNG) ?></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<meta name="author" content="webz0ne 1996 - <?php echo date('Y') ?>" />
		<link rel="shortcut icon" href="<?php echo URL_SITE ?>img/cdg.ico" type="image/x-icon" />
		<script>
			var pagetpl = '<?php echo $GLOBALS["page"] ?>';
			var applng = '<?php echo APPLNG ?>';
			var pathToImages = '<?php echo URL_SITE ?>img/';
		</script>
		<link type="text/css" rel="stylesheet" media="all" href="<?php echo URL_SITE ?>css/css.php?<?php echo time() ?>" />
		<link href="<?php echo URL_SITE ?>css/dhtmlgoodies_calendar.css?<?php echo time() ?>" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js?<?php echo time() ?>"></script>
		<script type="text/javascript" src="<?php echo URL_SITE ?>js/js.php?<?php echo time() ?>"></script>
		<script src="<?php echo URL_SITE ?>js/dhtmlgoodies_calendar.js?<?php echo time() ?>" type="text/javascript"></script>
	</head>
	<body>
		<form id="chnlng" method="post" action="<?php echo URL_SITE ?>">
			<input type="hidden" id="redir" name="redir" value="<?php echo REQUESTURI ?>" />
			<input type="hidden" id="setlng" name="setlng" value="" />
			<input type="hidden" id="oldlng" name="oldlng" value="<?php echo APPLNG ?>" />
		</form>
		<div id="header">
			<div id="headercontenu">
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td width="50%"  style="text-align: left;" valign="middle">
						<a href="<?php echo URL_SITE ?>">
							<img src="<?php echo URL_SITE ?>img/cdg.png" alt="<?php echo TITREBO ?>" title="<?php echo TITREBO ?>" border="0" />
						</a>
						<br />
						<span onclick="go('<?php echo URL_SITE ?>');" class="bologo">
							<img src="<?php echo URL_SITE ?>?blackttf=1&txt=BACKOFFICE&tp=18" alt="BACKOFFICE" title="BACKOFFICE" />
						</span>
					</td>
					<td width="50%" style="text-align: right;">
						<img src="<?php echo URL_SITE ?>img/drapeaux/fr.png" alt="<?php echo trad('Français', APPLNG) ?>" title="<?php echo trad('Français', APPLNG) ?>" style="cursor: pointer; visibility: <?php if (APPLNG <> 'fr'): ?>visible<?php else: ?>hidden<?php endif; ?>;" onclick="changelng('fr');" />&nbsp;
						<img src="<?php echo URL_SITE ?>img/drapeaux/gb.png" alt="<?php echo trad('Anglais', APPLNG) ?>" title="<?php echo trad('Anglais', APPLNG) ?>" style="cursor: pointer; visibility: <?php if (APPLNG <> 'en'): ?>visible<?php else: ?>hidden<?php endif; ?>;" onclick="changelng('en');" />&nbsp;
						<img src="<?php echo URL_SITE ?>img/drapeaux/de.png" alt="<?php echo trad('Allemand', APPLNG) ?>" title="<?php echo trad('Allemand', APPLNG) ?>" style="cursor: pointer; visibility: <?php if (APPLNG <> 'de'): ?>visible<?php else: ?>hidden<?php endif; ?>;" onclick="changelng('de');" />&nbsp;
						<img src="<?php echo URL_SITE ?>img/drapeaux/es.png" alt="<?php echo trad('Espagnol', APPLNG) ?>" title="<?php echo trad('Espagnol', APPLNG) ?>" style="cursor: pointer; visibility: <?php if (APPLNG <> 'es'): ?>visible<?php else: ?>hidden<?php endif; ?>;" onclick="changelng('es');" />
						<?php if(get_s("bo_user") > 0): ?>
						<br />
						<?php if ($GLOBALS["page"] <> 'accueil' && $GLOBALS["page"] <> 404):  ?>
						<a href="<?php echo rw('accueil') ?>"><?php echo trad('Tableau de bord', APPLNG) ?></a>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<?php endif; ?>
						<a href="<?php echo URL_SITE ?>?logout=1"><?php echo trad('Se déconnecter', APPLNG) ?></a>
						<?php endif; ?>
					</td>
				</tr>
				</table>
			</div>
		</div>
		<div class="sep"></div>
		<div id="contenu">
<?php if (!$this -> habilitation): ?>
	<div class="sep"></div>
	<div class="msg msg-erreur">
		<p>
			<?php echo trad('Vous n\'avez pas les habilitations suffisantes pour afficher cette page.', APPLNG) ?>
		</p>
	</div>
<?php else: ?>
	<?php if($this -> erreur_table): ?>
	<div class="sep"></div>
	<div class="msg msg-erreur">
		<p>
			<?php echo trad('La table ' . $this -> table . ' n\'est pas correctement configurée.', APPLNG) ?>
		</p>
	</div>
	<?php endif; ?>
	<img src="<?php echo URL_SITE ?>?titrettf=1&txt=<?php echo trad($this -> titre, APPLNG) ?>" alt="<?php echo trad($this -> titre, APPLNG) ?>" title="<?php echo trad($this -> titre, APPLNG) ?>" /><p />
	<?php if($this -> message_erreur): ?>
	<div class="sep"></div>
	<div class="msg msg-erreur">
		<p>
			<?php echo trad($this -> message_erreur, APPLNG) ?>
		</p>
	</div>
	<?php endif; ?>
	<?php if($this -> message_ok): ?>
	<div class="sep"></div>
	<div class="msg msg-ok">
		<p>
			<?php echo trad("L'enregistrement s'est déroulé correctement.", APPLNG) ?>
			<br />
			<a href="<?php echo $this -> retour_url ?>"><?php echo trad("Retour", APPLNG) ?></a>
		</p>
	</div>
	<?php exit; ?>
	<?php endif; ?>
	<div class="sep"></div>
	<form id="add_form" method="post" action="<?php echo URL_SITE ?>" enctype="multipart/form-data">
		<?php echo form_hidden('MAX_FILE_SIZE', '100000000000') ?>
		<?php echo form_hidden('action_form', 1) ?>
		<?php echo form_hidden('page', $this -> page) ?>
		<?php echo form_hidden('table', $this -> table) ?>
		<table class="form_crud">
		<?php foreach ($this -> champs as $champ): ?>
		<tr>
			<td valign="top" style="text-align: right;" class="crud_title" width="35%">
				<?php echo trad($champ['Affichage'], APPLNG) ?><?php if($champ["obligatoire"]): ?> <sup style="color: red;">*</sup><?php endif; ?>
			</td>
			<td valign="top" width="65%">
				<?php if ($champ['type'] == 'input'): ?>
					<?php echo form_input($champ['id'], $_POST[$champ['id']], 50, $champ['max']) ?>
				<?php elseif ($champ['type'] == 'password'): ?>
					<?php echo form_password($champ['id'], $_POST[$champ['id']], 50, $champ['max']) ?>
				<?php elseif ($champ['type'] == 'textarea'): ?>
					<?php echo form_textarea($champ['id'], $_POST[$champ['id']], $champ['max']) ?>
				<?php elseif ($champ['type'] == 'hidden'): ?>
					<?php echo form_hidden($champ['id'], $_POST[$champ['id']]) ?>
				<?php elseif ($champ['type'] == 'select'): ?>
					<?php echo form_select($champ['id'], ($_POST[$champ['id']]) ? $_POST[$champ['id']] : $champ['defaut'], $champ['typeselect'], $champ['data'], $champ['premierchoix'], $champ['js']) ?>
				<?php endif; ?>
			</td>
		</tr>
		<?php endforeach; ?>
		<tr>
			<td valign="top" >
				&nbsp;
			</td>
			<td valign="top" >
				<?php echo btform(trad('AJOUTER', APPLNG)) ?>
				&nbsp;&nbsp;&nbsp;&nbsp;
				<img onclick="$('#add_form')[0].reset();" class="submit" src="<?php echo URL_SITE ?>?imgform=1&txt=<?php echo trad('ANNULER', APPLNG) ?>&fc=0,0,0&bc=255,255,255&tp=12" alt="<?php echo trad('ANNULER', APPLNG) ?>" title="<?php echo trad('ANNULER', APPLNG) ?>" onmouseout="this.src = '<?php echo URL_SITE ?>?imgform=1&txt=<?php echo trad('ANNULER', APPLNG) ?>&fc=0,0,0&bc=255,255,255&tp=12'" onmouseover="this.src = '<?php echo URL_SITE ?>?imgform=1&txt=<?php echo trad('ANNULER', APPLNG) ?>&fc=255,255,255&bc=0,0,0&tp=12'" />
			</td>
		</tr>
		</table>
	</form>
	<p />
	<i><sup style="color: red;">*</sup>&nbsp;<?php echo trad('Champs obligatoires', APPLNG) ?></i>
	<div class="sep"></div>
	<img style="position: relative; top: 5px;" src="<?php echo URL_SITE ?>img/back.png" alt="<?php echo trad('Retour', APPLNG) ?>" title="<?php echo trad('Retour', APPLNG) ?>" />&nbsp;&nbsp;<a href="<?php echo $this -> retour_url ?>"><?php echo trad('Retour', APPLNG) ?></a>
<?php endif; ?>		</div>
		<div class="sep"></div>
		<div id="footer">
			<div id="footercontenu">
				<img style="position: relative; top: 5px;" src="<?php echo URL_SITE ?>?blackttf=1&txt=© 2011<?php if(date("Y") > 2011): ?> - <?php echo date("Y") ?><?php endif; ?> - Comme des Garçons&tp=11" alt="COPYRIGHT" title="COPYRIGHT" />
			</div>
		</div>
  </body>
</html>